﻿#region Using directives

using System;
using System.Text;
using System.CodeDom;
using System.Collections.Generic;

#endregion

namespace Weazel.Gezel.Conversions.Model
{
  public class Statement
  {
		public static readonly CodeSnippetStatement OpenBracket = new CodeSnippetStatement("{");
		public static readonly CodeSnippetStatement CloseBracket = new CodeSnippetStatement("}");
		public static readonly CodeSnippetStatement Empty = new CodeSnippetStatement(string.Empty);

    private string contents;
    public string Contents
    {
      get { return contents; }
    }

    private int indent;
    public int Indent
    {
      get { return indent; }
    }

    public Statement(string contents)
    {
      this.contents = contents;
      this.indent = 0;
    }

    public Statement(string contents, int indent)
    {
      this.contents = contents;
      this.indent = indent;
    }

    public Statement(string contents, params object[] args)
    {
      this.contents = string.Format(contents, args);
      this.indent = 0;
    }

    public Statement(string contents, int indent, params object[] args)
    {
      this.contents = string.Format(contents, args);
      this.indent = indent;
    }

		public virtual string ToString(TargetLanguage language)
		{
			// for now, ignore language
			return contents;
		}

    public override string ToString()
    {
      return contents;
    }
  }
}
